using Boo.Lang;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;

[Serializable]
public class GUITouchScrollJS : MonoBehaviour
{
	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024ToggleScroll_0024382 : GenericGenerator<WaitForSeconds>
	{
		internal GUITouchScrollJS _0024self__0024384;

		public _0024ToggleScroll_0024382(GUITouchScrollJS self_)
		{
			_0024self__0024384 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024384);
		}
	}

	public GUISkin optionsSkin;

	public Vector2 scrollPosition;

	public int numRows;

	public Vector2 rowSize;

	public Vector2 windowMargin;

	public Vector2 listMargin;

	private Rect windowRect;

	public AudioClip clip;

	public calibrate cal1;

	public autocalibrateonoff cal2;

	public Vector2 pos;

	public string[] teksti;

	public Texture[] kuva;

	public string version;

	public int show;

	private Camera cam;

	public int tune;

	public int changelogTune;

	private float originalWidth;

	private float originalHeight;

	public Vector2 scale;

	public float fStopThreshold;

	public float coef;

	public float smoothcoef;

	private float fResistanceFactor;

	private bool bTranslating;

	private Vector3 v3StartPos;

	private Vector3 v3LastPos;

	private Vector3 v3Delta;

	private float fStartTime;

	private float scrollPositionL;

	private float scrh;

	private bool scrollable;

	public GUITouchScrollJS()
	{
		version = "1";
		show = 1;
		tune = 20000;
		originalWidth = 640f;
		originalHeight = 360f;
		fStopThreshold = 1f;
		coef = 850f;
		smoothcoef = 0.05f;
		fResistanceFactor = 0.9f;
		scrollable = true;
	}

	public void Awake()
	{
		scrh = Screen.height;
		cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>();
	}

	public void OnDisable()
	{
		show = 1;
	}

	public void CheckRes()
	{
		int num = tune;
		if (show == 2)
		{
			num = changelogTune;
		}
		scrollable = true;
		if (Screen.height > 700)
		{
			numRows = num / (Mathf.Clamp(Screen.height, 0, 1000) + 50);
		}
		else
		{
			numRows = num / (Mathf.Clamp(Screen.height, 0, 1000) + 380);
		}
		if (Screen.width > 640)
		{
			scale.x = ((float)Screen.width + 0f) / originalWidth;
			scale.y = ((float)Screen.height + 0f) / originalHeight;
		}
		else
		{
			scale.x = 1f;
			scale.y = 1f;
		}
		if (Screen.width > 1020)
		{
			scale.x = 1024f / originalWidth;
			scale.y = 600f / originalHeight;
		}
	}

	public void Update()
	{
		if (!scrollable)
		{
			return;
		}
		if (Input.GetMouseButtonDown(0))
		{
			bTranslating = false;
			v3StartPos = UnityEngine.Input.GetTouch(0).position;
			v3LastPos = v3StartPos;
			fStartTime = Time.time;
		}
		if (Input.GetMouseButtonUp(0))
		{
			v3Delta = UnityEngine.Input.GetTouch(0).position;
			if (v3Delta == v3LastPos)
			{
				v3StartPos = v3Delta;
				fStartTime = Time.time;
			}
			v3Delta = (v3Delta - v3StartPos) / (Time.time - fStartTime);
			bTranslating = true;
			if (!(Mathf.Abs(v3Delta.y) >= 300f))
			{
				v3Delta.y = 0f;
			}
		}
		if (Input.GetMouseButton(0))
		{
			Vector3 a = UnityEngine.Input.GetTouch(0).position;
			if (v3Delta == v3LastPos)
			{
				v3StartPos = UnityEngine.Input.GetTouch(0).position;
				v3LastPos = v3StartPos;
				fStartTime = Time.time;
			}
			Vector2 vector = a - v3LastPos;
			vector.x = 0f;
			vector.y /= scrh;
			scrollPosition.y += vector.y * coef;
			scrollPositionL = scrollPosition.y;
			v3LastPos = a;
		}
		if (bTranslating && !(v3Delta.magnitude <= 10f))
		{
			scrollPositionL += v3Delta.y * smoothcoef;
			v3Delta *= fResistanceFactor;
			if (!(v3Delta.magnitude >= fStopThreshold))
			{
				bTranslating = false;
			}
		}
		if (!Input.GetMouseButton(0))
		{
			scrollPosition.y = Mathf.Lerp(scrollPosition.y, scrollPositionL, Time.deltaTime * 8f);
		}
	}

	public void OnGUI()
	{
		GUI.skin = optionsSkin;
		windowRect = new Rect(windowMargin.x, windowMargin.y, (float)Screen.width - 2f * windowMargin.x, (float)Screen.height - 2f * windowMargin.y);
		if (show == 1)
		{
			GUI.Window(0, windowRect, DoWindow, "Spin-Tops Help/Info");
			StateManager.state = State.HelpScreen;
		}
		else
		{
			GUI.Window(0, windowRect, DoWindowC, "Spin-Tops ChangeLog");
			StateManager.state = State.ChangeLog;
		}
	}

	public void DoWindow(int windowID)
	{
		cam.farClipPlane = 0.25f;
		Vector2 vector = new Vector2(windowRect.width - 2f * listMargin.x, windowRect.height - 2f * listMargin.y);
		Rect position = new Rect(listMargin.x, listMargin.y, vector.x, vector.y);
		Rect viewRect = new Rect(0f, 0f, rowSize.x, (float)numRows * rowSize.y);
		scrollPosition = GUI.BeginScrollView(position, scrollPosition, viewRect, alwaysShowHorizontal: false, alwaysShowVertical: false);
		GUILayout.Label("<b>Hello, and welcome to Spin-Tops!</b>");
		GUILayout.Label(string.Empty);
		if (GUILayout.Button("Close/Continue", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			DisableHelp(changelog: false);
		}
		GUILayout.Label(string.Empty);
		GUILayout.Label(string.Empty);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[33]);
		GUILayout.Label(teksti[14]);
		GUI.contentColor = Color.white;
		GUILayout.Label(teksti[35]);
		GUILayout.Label(kuva[3]);
		GUILayout.Label(string.Empty);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[20]);
		GUILayout.Label(teksti[14]);
		GUI.contentColor = Color.white;
		GUILayout.Label(teksti[22]);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[23]);
		GUI.contentColor = Color.white;
		GUILayout.Label(teksti[24]);
		GUILayout.Label(kuva[1]);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[25]);
		GUI.contentColor = Color.white;
		GUILayout.Label(teksti[26]);
		GUILayout.Label(kuva[2]);
		GUILayout.Label(string.Empty);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[43]);
		GUILayout.Label(teksti[14]);
		GUI.contentColor = Color.white;
		GUILayout.Label(teksti[45]);
		GUILayout.Label(kuva[4]);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[52]);
		GUILayout.Label(teksti[14]);
		GUI.contentColor = Color.white;
		GUILayout.Label(string.Empty);
		GUILayout.Label(teksti[54]);
		GUILayout.Label(kuva[5]);
		GUILayout.Label(string.Empty);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[81]);
		GUILayout.Label(teksti[14]);
		GUI.contentColor = Color.white;
		GUILayout.Label(teksti[83]);
		GUILayout.Label(teksti[84]);
		GUILayout.Label(teksti[85]);
		GUILayout.Label(kuva[7]);
		GUILayout.Label(string.Empty);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[88]);
		GUI.contentColor = Color.white;
		GUILayout.Label(teksti[89]);
		GUILayout.Label(teksti[90]);
		GUILayout.Label(teksti[92]);
		GUILayout.Label(string.Empty);
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label(teksti[100]);
		GUILayout.Label(teksti[99]);
		GUI.contentColor = Color.white;
		GUILayout.Label(kuva[9]);
		if (GUILayout.Button("Buy Spin-Tops", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			UnityEngine.SceneManagement.SceneManager.LoadScene("IAP");
		}
		if (GUILayout.Button("Rate (Google Play Store)", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			PlayerPrefs.SetInt("Rated", 1);
			Application.OpenURL("market://details?id=fi.Miksumortti.SpinTops");
		}
		if (GUILayout.Button("Send E-mail To Developer", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			Application.OpenURL("mailto:contact.miksumortti@gmail.com?subject=Spin-Tops User Mail&body=Write your bug, question or whatever here. Please write in English or Finnish. Thanks!");
		}
		if (GUILayout.Button("miksumortti.com", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			Application.OpenURL("https://miksumortti.com");
		}
		GUILayout.Label(string.Empty);
		if (GUILayout.Button("Changelog", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			show = 2;
		}
		if (GUILayout.Button("Close/Continue", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			if ((bool)cal1)
			{
				cal1.enabled = true;
				cal2.enabled = true;
			}
			PlayerPrefs.SetInt("Tutorial", 1);
			gameObject.SetActive(false);
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			cam.farClipPlane = 1000f;
		}
		GUI.EndScrollView();
	}

	public void DoWindowC(int windowID)
	{
		cam.farClipPlane = 0.2f;
		Vector2 vector = new Vector2(windowRect.width - 2f * listMargin.x, windowRect.height - 2f * listMargin.y);
		Rect position = new Rect(listMargin.x, listMargin.y, vector.x, vector.y);
		Rect viewRect = new Rect(0f, 0f, rowSize.x, (float)numRows * rowSize.y);
		scrollPosition = GUI.BeginScrollView(position, scrollPosition, viewRect, alwaysShowHorizontal: false, alwaysShowVertical: false);
		GUILayout.Label(string.Empty);
		if (GUILayout.Button("Close/Continue", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			if (show == 2)
			{
				if ((bool)cal1)
				{
					cal1.enabled = true;
					cal2.enabled = true;
				}
				gameObject.SetActive(false);
				AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
				cam.farClipPlane = 1000f;
			}
			else
			{
				DisableHelp(changelog: true);
			}
		}
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.9");
		GUI.contentColor = Color.white;
		GUILayout.Label("(4.10.2018)");
		GUILayout.Label("* Improved UI\n* Crash fixes, optimisations and various improvements\n* Updated engine and all libraries");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.8 b3");
		GUI.contentColor = Color.white;
		GUILayout.Label("(27.7.2018)");
		GUILayout.Label("* Crash fixes and improvements");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.8");
		GUI.contentColor = Color.white;
		GUILayout.Label("(14.12.2017)");
		GUILayout.Label("* New special attack: Hurricane Spin\n* Improved graphics when shadows are disabled");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.7");
		GUI.contentColor = Color.white;
		GUILayout.Label("(29.5.2017)");
		GUILayout.Label("* Enhanced texture quality\n* Achievement fixes and other improvements");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.6");
		GUI.contentColor = Color.white;
		GUILayout.Label("(17.2.2017)");
		GUILayout.Label("* Complete refresh with enhanced graphics, new shaders, real-time shadows, 64Bit support etc.\n* Google Play Games for leaderboards and achievements\n* Various improvements, bug fixes and optimisations");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.5.4b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(25.8.2015)");
		GUILayout.Label("* Improvements and quickfixes for last update");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.5.3b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(21.8.2015)");
		GUILayout.Label("* Sonic Boom new special attack\n* Menu improvements\n* Graphic updates\n* New Miksumortti logos\n* Optimizations\n* Fixed bugs\n* Updated plugins");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.5.2b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(26.5.2015)");
		GUILayout.Label("* Fixed achievements, in app purchase and some crashes");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.5.1b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(18.1.2015)");
		GUILayout.Label("* 2 Special Attacks (FireFly and Tesla Strike)\n* More dynamic camera\n* Improved graphics and menu\n* Autorotate screen in menus\n* Updated plugins\n* Lots of fixes, optimizations and improvements");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.5.0b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(30.12.2013)");
		GUILayout.Label("* Fixed arcade score saving on Hexa-Comb stadium\n* Some little tweaks");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.9b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(3.12.2013)");
		GUILayout.Label("* New control option: On-Screen Joystick\n* New sound effects and resampled old sounds for better quality\n* Fixed player top from falling through stadiums\n* Some tweaks to menus\n* Fixed bugs and errors");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.8b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(13.10.2013)");
		GUILayout.Label("* Some optimizations\n* Changed links to new website\n* Bugfixes");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.7b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(28.7.2013)");
		GUILayout.Label("* Fixed Workshop Spin Disk selection\n* Fixed bugs");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.6b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(16.5.2013)");
		GUILayout.Label("* Now you can customize your profile and there are other new features and improvements\n* Fixed many Career related, and user reported bugs\n* Added control sensitivity setting\n* Added 'Prebuilt Tops' selection in Market\n* Dynamic score and extra speed when stopping an opponent in Arcade mode (more with more hits)\n* One new achievement\n* Added info ticker and update checker\n* Some small improvements");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.5b quickfix");
		GUI.contentColor = Color.white;
		GUILayout.Label("(21.2.2013)");
		GUILayout.Label("* Fixed the In App Purchase problem, sorry for the inconvenience this may have caused\n* Fixed too high hanging menu texts");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.5b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(20.2.2013)");
		GUILayout.Label("* Online leaderboards and achievements\n* New stadium for In-App Purchasers: 'Marching Cubes'\n* Main menu buttons are scrollable\n* More accurate collision detect\n* Fixed opponents bug on match start\n* Scaled some stadiums bigger\n* Updated Unity engine\n* Optimizations\n* Removed some unused data\n* Some small bugfixes");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.4b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(3.1.2013)");
		GUILayout.Label("* Fixed the not working close/continue button\n* Optimized shaders -> better performance\n* Small bugs fixed");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.3b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(2.12.2012)");
		GUILayout.Label("* New Stadium - S-T-Droid\n* Fix for a rare problem in market\n* Other fixes\n* New Credits");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.2b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(7.11.2012)");
		GUILayout.Label("* Option to enable/disable 32-Bit graphics\n* Bugfixes\n* Some changes");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.1b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(19.10.2012)");
		GUILayout.Label("* Fixed 'stuck' match when player and opponent stops the same time\n* Slightly more responsive Spin-Tops movement with accelerometer\n* Bigger touch area for Launch Cords in Market\n* Updated plugins\n* Reduced pop-up ads");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.4.0b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(9.10.2012)");
		GUILayout.Label("* Fixed auto-sleep in Career and disabled it in menus\n* Small fixes");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.9b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(28.9.2012)");
		GUILayout.Label("* In-App Purchase to get ads removed and support development\n* Updated engine -> Fixes crashes and bugs\n* Fixed bugs\n* Optimizations");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.8b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(11.9.2012)");
		GUILayout.Label("* Optimized Market and Workshop part selections\n* Miscellaneous bugs fixed\n* Google+ button in Options");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.7b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(31.8.2012)");
		GUILayout.Label("* Part stats are now shown in Market also\n* Fixed 'wrong way launching'\n* Some small fixes");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.6b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(30.8.2012)");
		GUILayout.Label("* Bigger grabbing area for Launch Cord (easier especially for small phones)\n* Your Spin-Top spins a little bit longer\n* Various bugs fixed");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.5b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(21.8.2012)");
		GUILayout.Label("* Bigger buttons (on higher resolution)\n* Slightly bigger fonts\n* Adjusted options toggles\n* Some small changes and fixes");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.4b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(18.8.2012)");
		GUILayout.Label("* Fixed the tiny buttons on high dpi devices\n* Fixed critical bugs in part market\n* Added Share button in options\n* Preparations for special attacks\n* New splash screen and start-up screen\n* Optimizations\n* Fixed move to SD-Card\n* Some small changes");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.3b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(12.8.2012)");
		GUILayout.Label("* Bug fixes\n* Back-end changes to support coming features\n* Added Opponents Stopped counter to stats\n* Added update dates to ChangeLog");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.2b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(8.8.2012)");
		GUILayout.Label("* Updated Unity engine -> should improve some things and fix bugs\n* Fixed missing materials in tournament mode and other bugs\n* Updated plugins");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.1b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(7.8.2012)");
		GUILayout.Label("* Fixed some small bugs\n* Reduced unnecessary text mass in help/tutorial");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("0.9.3.9.0b");
		GUI.contentColor = Color.white;
		GUILayout.Label("(6.8.2012)");
		GUILayout.Label("* First version of public beta");
		GUI.contentColor = new Color(0f, 0.69f, 1f);
		GUILayout.Label("Planned for future updates");
		GUI.contentColor = Color.white;
		GUILayout.Label("* Special attacks and effects for the Element Plates\n* Leveling system by collecting exp\n* Achievements and Leaderboards (done)\n* Optimizations, bug fixes and usability improvements\n* New stadiums and Spin-Tops and some other content\n* AI tweaks\n* New game modes\n* Online multiplayer\n* Music and more sound effects\n* Graphic enhances\n* In-app purchase to remove ads and get extra content (done)");
		if (GUILayout.Button("Buy Spin-Tops", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			UnityEngine.SceneManagement.SceneManager.LoadScene("IAP");
		}
		if (GUILayout.Button("Rate (Google Play Store)", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			PlayerPrefs.SetInt("Rated", 1);
			Application.OpenURL("market://details?id=fi.Miksumortti.SpinTops");
		}
		if (GUILayout.Button("Send E-mail To Developer", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			Application.OpenURL("mailto:contact.miksumortti@gmail.com?subject=Spin-Tops User Mail&body=Write your bug, question or whatever here. Please write in English or Finnish. Thanks!");
		}
		if (GUILayout.Button("miksumortti.com", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			Application.OpenURL("https://miksumortti.com");
		}
		GUILayout.Label(string.Empty);
		if (GUILayout.Button("Close/Continue", GUILayout.Width(240f * scale.x), GUILayout.Height(32f * scale.y)))
		{
			if (show == 2)
			{
				if ((bool)cal1)
				{
					cal1.enabled = true;
					cal2.enabled = true;
				}
				gameObject.SetActive(false);
				AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
				cam.farClipPlane = 1000f;
			}
			else
			{
				DisableHelp(changelog: true);
			}
		}
		GUILayout.Label(kuva[9]);
		GUI.EndScrollView();
	}

	public IEnumerator ToggleScroll()
	{
		return new _0024ToggleScroll_0024382(this).GetEnumerator();
	}

	public void DisableHelp(bool changelog)
	{
		if (changelog)
		{
			StartCoroutine(ToggleScroll());
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			scrollPosition.y = 0f;
			if (PlayerPrefs.GetInt("Tutorial") == 1)
			{
				cam.farClipPlane = 50f;
				gameObject.SetActive(false);
				StateManager.state = State.Neutral;
			}
			else
			{
				show = 1;
				cam.farClipPlane = 0.25f;
			}
			return;
		}
		StartCoroutine(ToggleScroll());
		AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
		scrollPosition.y = 0f;
		scrollPositionL = 0f;
		cam.farClipPlane = 50f;
		if ((bool)cal1)
		{
			cal1.enabled = true;
			cal2.enabled = true;
		}
		gameObject.SetActive(false);
		StateManager.state = State.Neutral;
	}

	public void Main()
	{
		InvokeRepeating("CheckRes", 0f, 0.5f);
	}
}
